With the advancement in technology, a video is required to be rendered on different type of display devices. These display devices vary in sizes and capabilities. This often necessitates encoding of the videos in different formats so that they can be presented on the display devices with varying sizes and capabilities.
In a general sense, the encoding of a digital video is a process of compressing and/or decompressing it. The digital video may include spatial redundancies and temporal redundancies. The spatial redundancy corresponds to duplication of elements within the frame and the temporal redundancy corresponds to duplication of elements in two or more frames. The video encoding removes the spatial redundancies and the temporal redundancies, thereby reducing size and complexity of the digital video.
Video codec, a hardware device or a software application, performs encoding/decoding/transcoding of the digital video. In addition, the video codecs perform encoding/decoding/transcoding of the digital videos utilizing variety of video encoding formats including MPEG-2 Part 2, MPEG-4 Part 2, H.264 (MPEG-4 Part 10) and the like.
The H.264 standard, also referred to as Moving Picture Experts Group (MPEG)-4 Part 10 and Advanced Video Coding (AVC) is a video compression standard that provides a desirable video quality. However, the H.264 standard is resilient to poor network conditions and is more economic with usage of bandwidth. In addition, the H.264 standard enables video shape coding and broadens the range of environments for using the digital video. Initially, the H.264 standard splits stream of the digital video into single-image frames and then slice the single-image frames into 16×16 macroblocks. The 16×16 macroblocks may further be splitted in different sizes including 8×8 blocks, 4×4 blocks and the like. Further, to reduce the complexity of the digital video, the number of bits in the digital video is reduced by predicting redundancies in the macroblocks by utilizing various prediction modes.
Presently, various video codecs employ motion-compensated inter-frame prediction to exploit the temporal redundancy across the video frames to achieve high compression. Moreover, various video codecs (for example, H.264/AVC) employ spatial estimation for intra-frame prediction to reduce the spatial redundancy within an intra-coded frame.
Currently, the H.264 standard defines various prediction modes (hereinafter mode decision) for predicting the number of bits in the macroblocks. There are four coding modes that are defined for intra 16×16 block type and nine coding modes that are defined for intra 4×4 block type. The four coding modes for intra 16×16 block type include a DC prediction mode, a vertical prediction mode, a horizontal prediction mode and a plane prediction mode. Moreover, the nine coding modes for intra 4×4 block type include a vertical prediction mode, a horizontal prediction mode, a DC prediction mode, a diagonal down left prediction mode, a diagonal down right prediction mode, a vertical right prediction mode, a horizontal down prediction mode, a vertical left prediction mode and a horizontal up prediction mode. However, these coding modes require intensive computation in terms of processing hardware, power, storage and the like to encode each macroblock. This computational complexity poses challenge for encoding the digital videos in real-time. Thus, the video codecs exhaustively searches an optimal coding mode from the various prediction modes to achieve high compression efficiency of the digital video. Moreover, the current video codecs employ the exhaustive searching through multiple coding modes to determine the prediction mode with minimum computational complexity. However, due to the exhaustive searching, additional computational costs and complexity are incurred.
In light of the above stated discussion, there is a need for a method and system that overcomes the above stated drawbacks. In addition, the method and system should minimize the searching required for predicting the mode decisions. Further, the method and system should enable encoding/decoding/transcoding of the digital video without compromising on quality of the digital video. Furthermore, the method and system should provide reduction in computational complexity and hardware usage.